package com.xuhaijian.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName("t_order")
public class Order {
    @TableId(value = "id", type = IdType.INPUT)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;
    private String orderNo;  // 订单编号（唯一标识，用于幂等）
    private Long userId;
    private BigDecimal amount;
    private Integer status;  // 0-未支付，1-已支付
    private Date createTime;
    private Date updateTime;
}